package bank;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class GetMoney extends JPanel implements ActionListener {
    private Atm frame;
    private Icon btnOff = Util.getIcon("/images/buttonOff.jpg");
    private JButton imageBtn1 = new JButton(btnOff);
    public GetMoney(Atm frame){
        this.frame=frame;
        this.setLayout(null);
        this.setOpaque(false);
        JLabel save= new JLabel("取钱");
        save.setBounds(50, 50, 100, 50);
        this.add(save);

        imageBtn1.setBounds(650, 430, 140, 50);
        this.add(imageBtn1);
        imageBtn1.addActionListener(this);

    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == imageBtn1) {
            frame.switchPanel("menu");
        }
    }
}
